package com.binance.assetservice.vo.request;


import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;

import com.binance.master.commons.ToString;
import com.binance.master.enums.BaseEnum;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@ApiModel("获取tranId")
@Setter
@Getter
public class GetTranRequest extends ToString {

    private static final long serialVersionUID = -1125959734762880231L;

    public enum TranType implements BaseEnum {
        MONEY_TRADING("1", ""),
        USER_CHARGE("11", "用户入金"),
        ASSET_TRANSFER("22", "持仓划转"),
        DRIBBLET_EXCHANGE("80", "小额资产转换");

        private String code;
        private String desc;

        private TranType(String code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        @Override
        public String getCode() {
            return code;
        }

        @Override
        public String getDesc() {
            return desc;
        }

    }

    @ApiModelProperty(notes = "类型，未来将废弃。请使用Integer类型的tranType属性")
    @Deprecated
    private TranType type;

    @ApiModelProperty(notes = "类型")
    private Integer tranType;

    @ApiModelProperty(notes = "时间", required = true)
    @NotNull
    private Date time;

    @ApiModelProperty(notes = "描述", required = true)
    @NotEmpty
    private String description;
}
